<template>
  <el-container class="JJIndexLayout">
    <el-header height="var(--jj-header-height)" style="border-bottom: 1px solid var(--c-divider-light)"><JJHeader /></el-header>
    <el-container>
      <el-aside :width="store.state.sidebar.isCollapse ? '64px' : '280px'"><JJMenu /></el-aside>
      <el-main style="padding: 0">
        <JJTagBar />
        <div class="MainContent"><router-view /></div>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import store from '../store'
import { defineComponent } from 'vue'
import JJHeader from '../components/JJHeader.vue'
import JJMenu from '../components/JJMenu.vue'
import JJTagBar from '../components/JJTagBar.vue'

export default defineComponent({
  name: 'JJIndexLayout',
  components: { JJMenu, JJHeader, JJTagBar },
  data() {
    return {
      store
    }
  }
})
</script>

<style lang="scss">
.JJIndexLayout {
  position: relative;
  height: 100vh;
  overflow: hidden;

  .MainContent {
    height: calc(100% - 32.5px);
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--c-bg-soft);
    z-index: 1;
  }
}
</style>
